﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Zarion_Quest.INTRO;
using Zarion_Quest.Base;
using Zarion_Quest.CREDITS;
using Zarion_Quest.GAMEOVER;
using Zarion_Quest.LEVELS;
using Zarion_Quest.PAUSE;
using Zarion_Quest.THEEND;


namespace Zarion_Quest.MENU
{
    class Menu : Scene
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="Content"></param>
        /// <param name="texture"></param>
        public Menu()
            : base(
              "Content/MENU/Background", //a imagem de fundo da cena
              "Content/MENU/Menu")//a musica de fundo da cena
        {
            
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="gameTime"></param>
        public override void Update(GameTime gameTime)
        {
            if (MediaPlayer.State != MediaState.Playing)
            {
                MediaPlayer.Play(background_music);
            }

            if (Game1.isPressed(Keys.I))
            {
                MediaPlayer.Stop();
                Game1.currentScreen = Game1.Screen.INTRO;
            }
            else if (Game1.isPressed(Keys.C))
            {
                MediaPlayer.Stop();
                Game1.currentScreen = Game1.Screen.CREDITS;
            }
            else if (Game1.isPressed(Keys.Enter))
            {
                MediaPlayer.Stop();  
                LevelManager.LoadLevel(new Level2());
                Game1.currentScreen = Game1.Screen.LEVELMANAGER;
              
            }


        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="gameTime"></param>
        /// <param name="spriteBatch"></param>
        public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(background, Vector2.Zero, Color.White);

        }
    }
}